1. Field of the Invention
The present invention relates to a method, an apparatus, and a computer readable medium thereof for pre-calculating and pre-storing information required to generate a self-shadow image and, during generation of the self-shadow image, retrieving the information to save time of real-time calculation.
2. Descriptions of the Related Art
With the progress of the multimedia and image processing technology, the animation industry has advanced from producing traditional flat image to producing 3D movies. Therefore, the current animated movies become more realistic. One of the key points to be realistic is the generation of shadow.
To generate self-shadow of an object in animated movies, there are many ways in the prior art, such as global illumination algorithm. However, it fails to provide real-time calculation.
Another way, ambient occlusion, performs ray tracing on an object's surface once to obtain the information of self-occlusion. More specifically, the technology of ambient occlusion calculates average visibility in environment vertex by vertex. With reference to the average visibility, a soft self-shadow effect on the object's surface may be created. Although the idea of ambient occlusion is simple, it needs considerable calculation amount because visibility calculation requires to be performed on all vertexes of the object's surface in every direction. Real-time calculation is still impossible.
Since every part of a dynamic object is moving in terms of time, the self-shadow changes all the time. The above-mentioned technologies for generating self-shadow have the drawback of failure in real-time processing so they are not suitable for generating self-shadow of a dynamic object. Accordingly, how to generate self-shadow of a dynamic object in animated movies is still a problem in the industry.